#include <iomanip>
#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
const string list_mois[12] = {"janvier","fevrier","mars","avril","mai","juin","juillet","aout","septembre","octobres","novembre","decembre"};

class Rectangle
{
      int x, y;
      int width, height;

public:

		int area()
		{
			return width * height;
		}
		void setDimensions(int x, int y)
		{
			this->width = x;
			this->height = y;
		}
};

class Date
{
	int jours;
	int mois;
	int annee;
public :
		Date(){
		jours=1;
		mois=1;
		annee=1970;
		}
	void setDate(int x, int y , int z){
		cout << x << " " << y <<" "<<z<<""<<endl;
		if ((x>0) and (x<32)){
			this->jours = x;
		}
		else{
		cout << "Error sur le jour : "<<x<<" invalide"<<endl;
		}
		if ((y>0) and (y<13)){
			this->mois = y;
		}else{
			cout << "Error sur le mois : "<<y<<" invalide"<<endl;
		}
		if (z>1970){
			this->annee = z;
		}else{
			cout << "Error sur l'année : "<<z<<" invalide"<<endl;
		}
	}

	void print(){
		cout << jours << "/" << mois << "/" << annee << endl;
		cout << jours << " " << list_mois[mois-1] << " " << annee << endl;
	}

};

int main()
{
      Rectangle r;
      r.setDimensions(10, 15);
      cout << r.area() << endl;
      Date plop;
      plop.setDate(12,34,100);
      plop.print();
}
